 <?php 

$username = $_GET['username'];
//$username='trang';

include("../db/opendb.php");
include("functions.php");

//$query = "select l.OID, l.LISTSTATUS, l.STREETNUM, l.STREETNAME, l.STREETSUFFIX, l.CITY, l.STATE from PROPERTIES l inner join Prop_Owner_Con p on p.Prop_OID = l.OID inner join Users u on u.ID = p.Owner where u.Username = '".$username."' order by l.LISTSTATUS";
$nquery = "select ID from Users where Username= '".$username."' ";
$nresult = mysql_query($nquery) or die ("SQL Error".mysql_error());
$nrow = mysql_fetch_assoc($nresult);

$user_id = $nrow['ID'];

$query = "select ID, Owner, Name, Date_Created from Network_Groups where Owner = '".$user_id."' order by Name";

$result = mysql_query($query) or die ("SQL Error".mysql_error());

$xml = getXML($result);

echo $xml;

?>
